package com.csoa.community.db;


import com.csoa.community.singletons.GlobalVars;

import android.content.Context;
import android.database.sqlite.SQLiteDatabase;

public class DataBaseDB{

	static SQLiteDatabase db;
	private static DatabaseHelper dbHelper;
	public static void createDB(Context context) {
		dbHelper = new DatabaseHelper(context, GlobalVars.DATABASE_NAME, null, 1);
		getDB();
	}
	
	public static void getDB() {
		db = dbHelper.getWritableDatabase();
	}
	
	public static void close() {
		SQLiteDatabase.releaseMemory();
		if(db != null) {
			db.close();
		}
	}
}
